package com.xiran.srpingboottemplateself.mapper;

import com.xiran.srpingboottemplateself.pojo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    User findByUsername(@Param("username") String username);

    User findById(@Param("id") Long id);

    User selectById(@Param("id") Long id);

    User selectOne(@Param("username") String username);

    int insert(@Param("user") User user);

    int updateById(@Param("user") User user);

    int deleteById(@Param("id") Long id);

    List<User> selectAll();
}